<template>
	<div class="signin">
		<h1 class="signin_title">用户登录</h1>
		<SignForm :type="type" :sendButtonMsg="sendButtonMsg" v-on:sendFormHandle="sendFormHandle" />
	</div>
</template>

<script>
	import SignForm from "../../components/user/sign-form.vue";
	export default {
		name:"Signin",
		data:function(){
			return{
				type:"signin",
				sendButtonMsg: "登 录"
			}
		},
		components:{
			SignForm
		},
		methods:{
			sendFormHandle: function(v){
				console.log(v)
			}
		},
		created:function(){
			let sign = this.$store.state.user;
			if (sign.islogin === "False"){
				this.$emit("upLocalData", [{
					name: "type",
					value: "signin"
				},{
					name: "channelName",
					value: "登录"
				}]);
			}else{
				this.$router.push("home");
			}
		}
	}
</script>

<style lang="less">
	@base:23.44/1rem;
	.signin{
		min-height: 700/@base;
		background-color: #fff;
		h1{
			&.signin_title{
				font-size:26/@base;
				padding:20/@base;
				font-weight: 400;
				border-bottom:1/@base solid #efefef;
			}
		}
	}
</style>
